package yzserver.sx4a.form;

import yzserver.sx4a.domain.UserDomain;

/**
 * Created with IntelliJ IDEA.
 * User: andrew
 * Date: 14-8-15
 * Time: 上午10:27
 * To change this template use File | Settings | File Templates.
 */
public class User {
    private String uid; //即登陆系统的账号名(一般来说此属性应该是工号或拼音名，信息系统基本按照工号（工程、公文）和登录拼音名（如portal和邮件）作为登陆账号)
    private String employeenumber;//工号
    private String cn;//账号的中文名
    private String mobile;//电话号码
    private String mail;//邮箱地址
    private String role;//角色信息
    private String enable;//    禁用的方式可根据系统禁用方式自行定义
    private String pwd;//账号的登陆密码
    private String startdate;//账号生效时间yyyy-MM-dd 如2010-03-08
    private String enddate;//账号失效时间yyyy-MM-dd 如2010-03-08
    private String updatedate;//    帐号更新时间yyyy-MM-dd HH:mm:ss，如2010-03-08 12:00:00
    private String position;//岗位id，根据应用需求定义是否需要（外部用户无）
    private String job;// 职务id，根据应用需求定义是否需要（外部用户无）
    private String org;// 组织id注意为20位的编码例如00410088002900000000
    private String sort;//显示排序例如：  00410000000000000000/10@00410000000000000000/20，组织号/序号 表示在00410000000000000000下，第一个,多值属性针对于同一个人在不同的组织下，排序不同
    private String misassperid;//人员ID（外部用户无）

    private String deptId; //所属部门-hlj
    private String userPosition;//职务称谓-hlj
    private String userLevel;//层级-hlj
    private String userEmployeetype;//员工类型-hlj
    private String oldDeptId;//原所属部门ID-hlj
    private String userCategory;//主职、兼职-hlj

    public User(){

    }

    public User(UserDomain domain) {
        this.uid = domain.getU_ID();
        this.employeenumber = domain.getEMPLOYEENUMBER();
        this.cn = domain.getCN();
        this.mobile = domain.getMOBILE();
        this.mail = domain.getMAIL();
        this.role = domain.getROLE();
        this.enable = domain.getENABLE();
        this.pwd = domain.getPWD();
        this.startdate = domain.getSTARTDATE();
        this.enddate = domain.getENDDATE();
        this.updatedate = domain.getUPDATEDATE();
        this.position = domain.getPOSITION()!=null?domain.getPOSITION().replaceAll(",","@"):null;
        this.job = domain.getJOB()!=null?domain.getJOB().replaceAll(",","@"):null;
        this.org = domain.getORG()!=null?domain.getORG().replaceAll(",","@"):null;
        this.sort = domain.getSORT()!=null?domain.getSORT().replaceAll(",","@"):null;
        this.misassperid = domain.getMISASSPER_ID();

        this.deptId =domain.getDEPT_ID();
        this.userPosition = domain.getUSER_POSITION();
        this.userLevel = domain.getUSER_LEVEL()   ;
        this.userEmployeetype = domain.getUSER_EMPLOYEETYPE();
        this.oldDeptId = domain.getOLD_DEPT_ID();
        this.userCategory = domain.getUSER_CATEGORY();
    }


    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getEmployeenumber() {
        return employeenumber;
    }

    public void setEmployeenumber(String employeenumber) {
        this.employeenumber = employeenumber;
    }

    public String getCn() {
        return cn;
    }

    public void setCn(String cn) {
        this.cn = cn;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getEnable() {
        return enable;
    }

    public void setEnable(String enable) {
        this.enable = enable;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getStartdate() {
        return startdate;
    }

    public void setStartdate(String startdate) {
        this.startdate = startdate;
    }

    public String getEnddate() {
        return enddate;
    }

    public void setEnddate(String enddate) {
        this.enddate = enddate;
    }

    public String getUpdatedate() {
        return updatedate;
    }

    public void setUpdatedate(String updatedate) {
        this.updatedate = updatedate;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public String getOrg() {
        return org;
    }

    public void setOrg(String org) {
        this.org = org;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getMisassperid() {
        return misassperid;
    }

    public void setMisassperid(String misassperid) {
        this.misassperid = misassperid;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getUserPosition() {
        return userPosition;
    }

    public void setUserPosition(String userPosition) {
        this.userPosition = userPosition;
    }

    public String getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(String userLevel) {
        this.userLevel = userLevel;
    }

    public String getUserEmployeetype() {
        return userEmployeetype;
    }

    public void setUserEmployeetype(String userEmployeetype) {
        this.userEmployeetype = userEmployeetype;
    }

    public String getOldDeptId() {
        return oldDeptId;
    }

    public void setOldDeptId(String oldDeptId) {
        this.oldDeptId = oldDeptId;
    }

    public String getUserCategory() {
        return userCategory;
    }

    public void setUserCategory(String userCategory) {
        this.userCategory = userCategory;
    }
}
